// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.chat-conversation {
  padding: 10px 20px;
  background: @osu-colour-b4;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  &::after {
    content: "";
    display: block;
    padding-bottom: 80px;

    .chat-conversation--no-input& {
      display: none;
    }
  }

  @media @mobile {
    padding: 10px 0px;
  }

  &__chat-label {
    color: white;
    text-align: center;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    overflow-wrap: break-word;
    margin: 0 20px;
  }

  &__new-chat-avatar {
    margin: 10px 0px;
    width: 100%;
    .center-content();
  }

  &__day-divider {
    color: @osu-colour-l1;
    text-align: center;
    font-size: 10px;
    padding-top: 20px;
    text-transform: uppercase;
    font-weight: bold;
  }

  &__cannot-message {
    color: @osu-colour-l1;
    text-align: center;
    font-size: 10px;
    padding: 5px;
    margin-top: 10px;
  }

  &__limitation-notice {
    color: @osu-colour-f1;
    text-align: center;
    font-size: 14px;
    padding: 5px;
    margin-top: 10px;
  }

  &__more-users {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  &__unread-marker {
    border-bottom: 1px solid @osu-colour-h1;
    color: @osu-colour-h1;
    margin: 5px 100px;
    font-size: 10px;

    line-height: 1em;
    position: relative;
    outline: 0;
    border: 0;
    text-align: center;
    height: 1.5em;

    &::before {
      content: "";
      background: @osu-colour-h1;
      position: absolute;
      left: 0;
      top: 50%;
      width: 100%;
      height: 1px;
    }

    &::after {
      content: attr(data-content);
      position: relative;
      display: inline-block;
      padding: 0 0.5em;
      line-height: 1.5em;
      color: @osu-colour-h1;
      background-color: @osu-colour-b4;
    }
  }

  &__users {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-content: center;
    justify-content: center;

    &--loading {
      gap: 5px;
    }
  }

  &__users-container {
    .default-border-radius();
    background-color: hsl(var(--hsl-b5));
    padding: 5px;
    display: grid;
    gap: 5px;
    margin: 10px;
  }
}
